<?php
session_start();
//--- устанавливаем время жизни сессии -----------------------------------------
$time_out = 120; //--- секунд или 2 минуты
$_SESSION['by'] = time() + $time_out;
//--- constants
define("LIB","docs/lib2/");
//------------------------------------------------------------------------------
//--- подключаемся к базе данных -----------------------------------------------
include ('inc/mysql.php');
//--- проверяем пользователя на авторизацию ------------------------------------
include ('auth/auth.php')
//------------------------------------------------------------------------------
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru-ru" lang="ru-ru">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="robots" content="index, follow" />
  <meta name="keywords" content="Авиаметтелеком, метеообслуживание, СГМО, СГМИ, АМО, авиаметеорология" />
  <meta name="description" content="Авиаметтелеком - главный центр информационных технологий и метеорологического обслуживания авиации" /> 
  <!--meta name="generator" content="Joomla! 1.5 - Open Source Content Management" /-->
  <title>Авиаметтелеком</title>
  <!--link href="/www2/templates/meteo/favicon.ico" rel="shortcut icon" type="image/x-icon" /-->
  <!--script type="text/javascript" src="/www2/media/system/js/mootools.js"></script-->
  <!--script type="text/javascript" src="/www2/media/system/js/caption.js"></script-->

	<link rel="stylesheet" href="css/style.css" type="text/css" />
</head>
<!--body onload="document.forms[0].login.focus();">
-->
<body>
<?php
include ('inc/header.php');
?>
<!--DIV WORK-->
<!--div style="width:100%;align:center;"-->
<table style="width:100%;">
<tr>
<td align="center">
	<table width="1000px" border="0">
		<tr>
	    	<!--td width="1%">
	    	</td-->
			<td width="245px" valign="top" align="right">
				<?php include ('inc/menu_left.php'); ?>
		    </td>
	        <td width="5px">
	        </td>
			<td width="500px" valign="top" style="margin:10px 10px 10px 10px">
<?php
if(isset($_GET['id_top']))
{
	$id_top = (int)$_GET['id_top'];
	switch ($id_top)
	{
		case 0:
			include ('inc/main.php');
		break;
		case 1:
			include ('top/about.php');
		break;
		case 2:
			include ('top/cont.php');
		break;
		case 4:
			include ('news/news.php');
		break;
		case 5:
			include ('top/forum.php');
		break;		
		case 6:
			include ('docs/doc.php');
		break;
		case 7:
			include ('auth/enter.php');
		break;
		//----- редактор новостей
		case 14: 			
            if(USER_LOGGED)
            {
            	include('news/newa.php');
            }
			else
			{
				include ('auth/enter.php');
			}
		break;
		//----- редактор библиотеки документов
		case 16:
            if(USER_LOGGED)
            {
            	include ('docs/doca.php');
            }
			else
			{
				include ('auth/enter.php');
			}
		break;
		case 17: //---- справочники
			//include('test/timer.php');
		break;
		case 18: //---- тестовый таймер обновления страницы
			include('test/timer.php');
		break;
		case 21: //----- методическая работа -> приказы, распоряжения
			include('metod/prikaz.php');
		break;
		case 22: //----- методическая работа -> нормативные документы рф
			include('metod/norma.php');
		break;
		//----- методическая работа -> методические письма
		case 23: include('metod/mail.php'); break;		
		case 24: //----- методическая работа -> анализ
			include('metod/analiz.php');
		break;		
		case 25: //----- методическая работа -> процедуры
			include('metod/proced.php');
		break;
		//----- методическая работа -> документы ВМО
		case 26: include('metod/wmodoc.php'); break;		
		//----- методическая работа -> каталог БАМД 
		case 27: include('metod/katalog.php'); break;
////////////////////////////////////////////////////////////////////////////////		
		case 30: include('amo/report_amo.php'); break; 	//--- отчёты по АМО
		case 31: include('amo/t_sovet.php'); break;		//--- амо -> тех. совет			
		case 32: include('amo/ico.php'); break;			//--- амо -> СМК							
		case 33: include('amo/atlas.php'); break;		//--- амо -> атлас зон МДП
		case 34: include('amo/avia_pro.php'); break; 	//--- авиапроисшествия
////////////////////////////////////////////////////////////////////////////////		
		case 40: include('it/it_iitc.php'); break;
		case 41: include('it/it_tel.php'); break;				
////////////////////////////////////////////////////////////////////////////////
		case 45: //--- journal
			include('mag/j_about.php');
		break;
		case 50; include('fil/fil.php'); break;
		
	}
}
else
{
	include('inc/main.php');
}
?>
			</td>
			<td width="5px">
			</td>
			<td width="245px" valign="top">
				<?php include ('inc/menu_right.php'); ?>
			</td>
			<!--td width="1%">
			</td-->
		</tr>
	</table>
</td>
</tr>
</table>
<!--/div-->
<!--DIV WORK-->
<?php
include ('inc/footer.php');
?>
</body>
</html>
